package net.htjs.mobile.nyoa;

import android.app.Activity;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

 
public class Main extends Activity {

		@Override
		public void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			requestWindowFeature(Window.FEATURE_NO_TITLE);
			setContentView(R.layout.main);
			setTitle(R.string.app_name);

			getWindow().setFormat(PixelFormat.RGBA_8888);
			getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);
			try {
				TextView versionNumber = (TextView) findViewById(R.id.versionNumber);
				versionNumber.setText("Version " + "1.0");
			} catch (Exception e) {
				e.printStackTrace();
			}
			 

			new Handler().postDelayed(new Runnable() {
				public void run() {
					Intent mainIntent = new Intent(getApplication(),
							LoginActivity.class);
					Main.this.startActivity(mainIntent);
					Main.this.finish();
					overridePendingTransition(android.R.anim.fade_in,
							android.R.anim.fade_out);
				}
			}, 2000); 
		}

		public void onPause() {
			super.onPause();
		}

		public void onDestory() {
			super.onDestroy();
		}
	}